@(categories: List[Category], categoryForm : Form[Category], msg: String)

@import helper._


@main("Category list") {
    
    <h3>@categories.size() categories</h3>
    
    <ul>
        @for(category <- categories) {
            @categoryItem(category)
        }
    </ul>

	<hr />

		@form(controllers.category.routes.CategoryController.create()) {
				<h7><font color="red">@msg</font></h7>
        @inputText(categoryForm("name"))
        <select name="parent_id">
					<option value=""></option>
					@for(cat <- categories){
						<option value="@cat.getId()">@cat.getName()</option>
					}
				</select><br />
				<input class="btn-primary btn-xs" type="submit" value="Create">
    }
    
    
}